package cn.com.dhcc.adam.javaeight;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class TryResourceTest {

	static final String path = "D:/cPix.ini";
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		/*
		 * File file = new File("D:/cPix.ini"); try (InputStream is = new
		 * FileInputStream(file)) {
		 * 
		 * } catch (FileNotFoundException e) { e.printStackTrace(); } catch
		 * (IOException e) { e.printStackTrace(); }
		 */

		try (BufferedReader br = new BufferedReader(new FileReader(path))) {
			String content = "";
			while ((content = br.readLine()) != null) {
				System.out.println(content);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
